package 继承.继承的应用场景;

public class Dog1 extends Animal{
    //构造方法
    public Dog1() { }
    public Dog1(String name,int age,String sex) {
        this.name=name;
        this.age=age;
        this.sex=sex;
    }
    //公共方法
    void watch(){
        System.out.println(name+"会看见");
    }

}
